using System;
using System.Windows.Forms;
namespace SM
{
	public class Grid : DataGridView
	{
		protected override bool ProcessDialogKey(Keys keyData)
		{
			bool result;
			if (keyData == Keys.Return)
			{
				DataGridViewCell currentCell = base.CurrentCell;
				base.ProcessDialogKey(keyData);
				base.CurrentCell = currentCell;
				result = true;
			}
			else
			{
				result = base.ProcessDialogKey(keyData);
			}
			return result;
		}
		protected override bool ProcessDataGridViewKey(KeyEventArgs e)
		{
			return e.KeyCode == Keys.Return || base.ProcessDataGridViewKey(e);
		}
	}
}
